An injection well is used to flow fluid into a subterranean zone that includes a formation, a portion of a formation, or multiple formations, for example, sandstone, limestone or other formations. The injection fluid can be water, wastewater, brine, water mixed with chemicals, combinations of them or other fluids. Injection wells are sometimes used in hydrocarbon recovery. For example, fluid such as steam, carbon dioxide, water, or other fluid can be injected into a hydrocarbon reservoir to maintain reservoir pressure, or heat the hydrocarbon in the reservoir, thereby allowing the hydrocarbon to be recovered from the reservoir. Sometimes, a leak develops inside the injection well causing fluids to flow from a high pressure formation in the subterranean zone to a low pressure formation in another subterranean zone through the injection well, specifically, through the leak. Such leaks can affect an integrity of the injection wells, and, in turn, the hydrocarbon recovery from the hydrocarbon reservoir.